package com.spring.shiro.service.impl;


import com.spring.shiro.entity.User;
import com.spring.shiro.mapper.UserMapper;
import com.spring.shiro.service.CxfService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.jws.WebService;
import java.util.List;

@WebService(serviceName = "CxfServiceImpl",targetNamespace="http://service.shiro.spring.com", endpointInterface="com.spring.shiro.service.CxfService")
@Service
public class CxfServiceImpl implements CxfService {

    @Autowired
    private UserMapper userMapper;

    public User findById(Long userId) {
        return userMapper.selectByPrimaryKey(userId);
    }

    public List<User> findUsers(){
        return userMapper.selectAll();
    }

}
